
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

import com.pizza.hibernate.Adres;
import com.pizza.hibernate.User;

public class Start implements Runnable{
	static public Adres adres;
	static public PobranieObiektow p;

	static public User user;
	
	
	
	public static void main(String[] args) {
		Start test = new Start();
		JPanel checkVisible[]={
				new ImagePanel(new ImageIcon("tittle.jpg").getImage()), 
				new RejestrujPanel(test), 
				new Rejestruj_cdPanel(), 
				new showProfile(), 
				new Loguj(), 
				new Main_profile()};
			JPanel main_profile[]={
				new Main_profile_orders(),
				new Main_profile_settings(), 
				new Main_profile_profile()};
		
	new Thread(test).start();
    JFrame frame = new JFrame();
    
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocation(500, 100);
    frame.setSize(600, 435);
    frame.setVisible(true);
    
    
    for (int i = 0; i < checkVisible.length; i++) frame.add(checkVisible[i]);
    for (int j = 0; j < main_profile.length; j++) frame.add(main_profile[j]);
  }


	@Override
	public void run() {
		p= new PobranieObiektow();
	}
}

